<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  <title>Add an ArcGISImageLayer to a map - 4.0beta2</title>

  <link rel="stylesheet" href="https://js.arcgis.com/4.0beta2/esri/css/main.css">
  <script src="https://js.arcgis.com/4.0beta2/"></script>

  <style>
    html,
    body {
      padding: 0;
      margin: 0;
    }
  </style>

  <script>
    require([
        "esri/Map",
        "esri/views/MapView",
        "esri/layers/ArcGISImageLayer",
        "dojo/domReady!"
      ],
      function(
        Map, MapView,
        ArcGISImageLayer
      ) {

        /********************
         * Create image layer
         ********************/

        var layer = new ArcGISImageLayer({
          url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/NLCDLandCover2001/ImageServer"
        });

        /**************************
         * Add image layer to map
         *************************/

        var map = new Map({
          basemap: "gray",
          layers: [layer]
        });

        var view = new MapView({
          container: "viewDiv",
          map: map,
          center: [-100, 40],
          zoom: 5
        });
      });
  </script>
</head>

<body>
  <div id="viewDiv"></div>
</body>

</html>